package com.vue.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Teacher {
    @NotNull
    private Long id; //教师id
    private String username; //用户名
    @JsonIgnore //把当前对象转换为json字符串时，忽略password
    private String password; //密码
    @NotNull
    @Pattern(regexp = "^\\S{2,15}$")
    private String name; //姓名
    private String avatar; //头像url
    @NotNull
    @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String phone; //手机号
    @NotNull
    @Email
    private String email; //邮箱
    private String gender; //性别
    private String courseId; //课程id
    private Long isAdmin; //是否管理员
    private Long isPass; //是否通过
    private LocalDateTime createTime; //创建时间
    private LocalDateTime updateTime; //修改时间
}
